<div class="page-body">
    <div class="row">
        <div class="widget">
            <div class="widget-body">
                <div id="horizontal-form">
                    <form class="form-horizontal" role="form"
                          action="{:U('doEdit',array('activity_id'=>$data['activity_id']))}"
                          method="post" enctype="multipart/form-data">
                        <div class="form-group">
                            <label for="sm" class="col-sm-3 control-label no-padding-right">活动名：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control" id="sm" name="title" value="{$data.title}"
                                       required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">主办方：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control"  name="sponsor" value="{$data.sponsor}"
                                       required>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-3 control-label no-padding-right">联系方式：</label>
                            <div class="col-sm-3">
                                <input type="text" class="form-control"  name="contact" value="{$data.contact}"
                                       required>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">活动内容：</label>
                            <div class="col-sm-3">
                                <textarea name="content" class="form-control" rows="5" required>{$data.content}</textarea>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">报名开始时间：</label>
                            <div class="col-sm-3">
                                <input type="text" value="" name="apply_start"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">报名结束时间：</label>
                            <div class="col-sm-3">
                                <input type="text" value="" name="apply_end"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">活动开始时间：</label>
                            <div class="col-sm-3">
                                <input type="text" value="" name="activity_start"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">活动结束时间：</label>
                            <div class="col-sm-3">
                                <input type="text" value="" name="activity_end"
                                       class="form-control">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">可参加总人数：</label>
                            <div class="col-sm-3">
                                <div class="spinner spinner-horizontal spinner-right">
                                    <input type="number" name="apply_total" class="form-control" required
                                           value="{$data.apply_total}">
                                </div>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">报名费：</label>
                            <div class="col-sm-3">
                                <input type="number" name="price_apply" class="form-control" value="{$data.price_apply}">
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">材料费：</label>
                            <div class="col-sm-3">
                                <input type="number" name="price_material" class="form-control" value="{$data.price_material}"
                                       required>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">所需{:C('act_freenum_name')}：</label>
                            <div class="col-sm-3">
                                <input type="tel" name="num_deduct" class="form-control" value="{$data.num_deduct}"
                                       required>
                            </div>
                        </div>
                        <div class="form-group   ">
                            <label class="col-sm-3 control-label no-padding-right">活动图片：</label>
                            <div class="col-sm-3">
                                <input type="file" name="a_logo">
                                <notempty name="data.a_logo">
                                    <br>
                                    <img src="{$data.a_logo}" >
                                </notempty>
                            </div>
                        </div>
                        <div class="form-group  ">
                            <div class="col-sm-offset-3 col-sm-10">
                                <button type="submit" class="btn btn-primary">提 交</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script>
    $(function () {
        $("[name='apply_start']").datetimepicker({
            defaultDate: "{$data.apply_start}",
            sideBySide: true,
            format: "YYYY-MM-DD HH:mm:ss",
        });
        $("[name='apply_end']").datetimepicker({
            defaultDate: "{$data.apply_end}",
            sideBySide: true,
            format: "YYYY-MM-DD HH:mm:ss",
        });
        $("[name='activity_start']").datetimepicker({
            defaultDate: "{$data.activity_start}",
            sideBySide: true,
            format: "YYYY-MM-DD HH:mm:ss",
        });
        $("[name='activity_end']").datetimepicker({
            defaultDate: "{$data.activity_end}",
            sideBySide: true,
            format: "YYYY-MM-DD HH:mm:ss",
        });
    });
</script>